import request from '@/utils/request'

/**
 * 策略模板列表查询
 * @param {*} data
 */
export function queryPage(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/rushTemplate/queryPage',
    method: 'post',
    data
  })
}
/**
 * 创建策略模板
 * @param {*} data
 */
export function create(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/rushTemplate/insert',
    method: 'post',
    data
  })
}
/**
 * 编辑策略模板
 * @param {*} data
 */
export function update(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/rushTemplate/update',
    method: 'post',
    data
  })
}
/**
 * 删除策略模板
 * @param {*} id
 */
export function del(ids) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/rushTemplate/deleteByIds',
    method: 'get',
    params: { ids }
  })
}

/**
 * 获取策略模板-用于编辑回显
 * @param {*} id
 */
export function getDetail(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/rushTemplate/get',
    method: 'post',
    data
  })
}
